Skip to content

BLD / two fixes in build process#1

Open
jannesklee wants to merge 2 commits into
masterfrom
bugfix/make_fosite_run
Open

BLD / two fixes in build process#1
jannesklee wants to merge 2 commits into
masterfrom
bugfix/make_fosite_run

Conversation

@jannesklee
Copy link
Copy Markdown
Collaborator

  • enable C and CXX as languages which seems to be necessary to compile
  • set default RELEASE if nothing is set as build type
    • alternatively the README would need to be changed

@jannesklee jannesklee requested a review from tillense February 15, 2025 15:31
- enable C and CXX as languages which seems to be necessary to compile
- set default RELEASE if nothing is set as build type
    - alternatively the README would need to be changed
@tillense
Copy link
Copy Markdown
Owner

Hi Jannes, I would suggest to replace your code regarding the second issue by

-set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Should be one of RELEASE, DEBUG, PROFILING; default: RELEASE")
-if(NOT CMAKE_BUILD_TYPE)
-  set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "Build type" FORCE)
-endif()
+set (CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "Should be one of RELEASE, DEBUG, PROFILING; default: RELEASE" FORCE)
+set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_BUILD_TYPE_NAMES})

@jannesklee
Copy link
Copy Markdown
Collaborator Author

Hi Tobias, below is my output, when not using the enable_language commands. I used cmake version 3.31.5 to run it.

jklee@deneb:~/src/fosite/build$ cmake ..
-- Found Git: /usr/bin/git (found version "2.48.1")
CMake Error at /usr/share/cmake/Modules/Internal/CheckSourceCompiles.cmake:51 (message):
  check_source_compiles: CXX: needs to be enabled before use.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CheckCXXSourceCompiles.cmake:58 (cmake_check_source_compiles)
  /usr/lib/cmake/llvm/FindFFI.cmake:62 (check_cxx_source_compiles)
  /usr/lib/cmake/llvm/LLVMConfig.cmake:261 (find_package)
  CMakeLists.txt:44 (find_package)


-- Could NOT find FFI (missing: HAVE_FFI_CALL) 
-- Looking for histedit.h
CMake Error at /usr/share/cmake/Modules/CheckIncludeFile.cmake:99 (try_compile):
  Unknown extension ".c" for file

    /home/jklee/src/fosite/build/CMakeFiles/CMakeScratch/TryCompile-GMrg2Y/CheckIncludeFile.c

  try_compile() works only for enabled languages.  Currently these are:

    NONE

  See project() command to enable other languages.
Call Stack (most recent call first):
  /usr/lib/cmake/llvm/FindLibEdit.cmake:28 (check_include_file)
  /usr/lib/cmake/llvm/LLVMConfig.cmake:268 (find_package)
  CMakeLists.txt:44 (find_package)


-- Looking for histedit.h - not found
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES) 
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
CMake Error at /usr/share/cmake/Modules/FindThreads.cmake:66 (message):
  FindThreads only works if either C or CXX language is enabled
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib/cmake/zstd/zstdConfig.cmake:39 (find_dependency)
  /usr/lib/cmake/llvm/LLVMConfig.cmake:283 (find_package)
  CMakeLists.txt:44 (find_package)


-- Configuring incomplete, errors occurred!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants