Skip to content

Commit

Permalink
cmake: update
Browse files Browse the repository at this point in the history
  • Loading branch information
wistaria committed Nov 27, 2024
1 parent d6fb9d8 commit 309fbef
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
9 changes: 9 additions & 0 deletions cmake/config-gcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if(NOT CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
endif(NOT CMAKE_C_COMPILER)
if(NOT CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
endif(NOT CMAKE_CXX_COMPILER)
if(NOT CMAKE_Fortran_COMPILER)
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
endif(NOT CMAKE_Fortran_COMPILER)
File renamed without changes.
2 changes: 1 addition & 1 deletion cmake/nanobind.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ include(FetchContent)
FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
GIT_TAG 784efa2a0358a4dc5432c74f5685ee026e20f2b6 # v2.2.0
GIT_TAG v2.2.0
)
list(APPEND FetchContents nanobind)
2 changes: 2 additions & 0 deletions cmake/postfix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ if(NOT DEVCORE_POSTFIX_CMAKE_INCLUDED)
set(CMAKE_CXX_EXTENSIONS OFF)

enable_testing()

set(DEVCORE_POSTFIX_CMAKE_INCLUDED TRUE)
endif(NOT DEVCORE_POSTFIX_CMAKE_INCLUDED)
5 changes: 4 additions & 1 deletion cmake/prefix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT DEVCORE_PREFIX_CMAKE_INCLUDED)

if(CONFIG)
message(STATUS "Loading compiler configration: " ${CONFIG})
include(cmake/${CONFIG}.cmake)
include(cmake/config-${CONFIG}.cmake)
else(CONFIG)
if(NOT CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
Expand All @@ -18,5 +18,8 @@ if(NOT DEVCORE_PREFIX_CMAKE_INCLUDED)
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
endif(NOT CMAKE_Fortran_COMPILER)
endif(CONFIG)

set(FETCHCONTENT_UPDATES_DISCONNECTED ON)

set(DEVCORE_PREFIX_CMAKE_INCLUDED TRUE)
endif(NOT DEVCORE_PREFIX_CMAKE_INCLUDED)
2 changes: 1 addition & 1 deletion cmake/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ include(FetchContent)
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG a2e59f0e7065404b44dfe92a28aca47ba1378dc4 # v2.13.6
GIT_TAG v2.13.6
)
list(APPEND FetchContents pybind11)

0 comments on commit 309fbef

Please sign in to comment.