mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
build: forgot to commit changes in one CMake file :-(
This commit is contained in:
@@ -23,15 +23,15 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
# core library options
|
# core library options
|
||||||
set(${ProjectPrefix}DOWNCAST_MODE ON CACHE STRING "Select downcasting mode")
|
set(${projectPrefix}DOWNCAST_MODE ON CACHE STRING "Select downcasting mode")
|
||||||
set_property(CACHE ${ProjectPrefix}DOWNCAST_MODE PROPERTY STRINGS AUTO ON OFF)
|
set_property(CACHE ${projectPrefix}DOWNCAST_MODE PROPERTY STRINGS AUTO ON OFF)
|
||||||
|
|
||||||
# find dependencies
|
# find dependencies
|
||||||
find_package(gsl-lite CONFIG REQUIRED)
|
find_package(gsl-lite CONFIG REQUIRED)
|
||||||
|
|
||||||
# check if libc++ is being used
|
# check if libc++ is being used
|
||||||
include(CheckLibcxxInUse)
|
include(CheckLibcxxInUse)
|
||||||
check_libcxx_in_use(${ProjectPrefix}LIBCXX)
|
check_libcxx_in_use(${projectPrefix}LIBCXX)
|
||||||
|
|
||||||
# core library definition
|
# core library definition
|
||||||
add_library(mp-units-core INTERFACE)
|
add_library(mp-units-core INTERFACE)
|
||||||
@@ -45,7 +45,7 @@ target_include_directories(mp-units-core ${unitsAsSystem} INTERFACE
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
if(${ProjectPrefix}LIBCXX)
|
if(${projectPrefix}LIBCXX)
|
||||||
find_package(range-v3 CONFIG REQUIRED)
|
find_package(range-v3 CONFIG REQUIRED)
|
||||||
target_link_libraries(mp-units-core INTERFACE range-v3::range-v3)
|
target_link_libraries(mp-units-core INTERFACE range-v3::range-v3)
|
||||||
endif()
|
endif()
|
||||||
@@ -55,14 +55,14 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(DEFINED ${ProjectPrefix}DOWNCAST_MODE)
|
if(DEFINED ${projectPrefix}DOWNCAST_MODE)
|
||||||
set(downcast_mode_options OFF ON AUTO)
|
set(downcast_mode_options OFF ON AUTO)
|
||||||
list(FIND downcast_mode_options "${${ProjectPrefix}DOWNCAST_MODE}" downcast_mode)
|
list(FIND downcast_mode_options "${${projectPrefix}DOWNCAST_MODE}" downcast_mode)
|
||||||
if(downcast_mode EQUAL -1)
|
if(downcast_mode EQUAL -1)
|
||||||
message(FATAL_ERROR "'${ProjectPrefix}DOWNCAST_MODE' should be one of ${downcast_mode_options} ('${${ProjectPrefix}DOWNCAST_MODE}' received)")
|
message(FATAL_ERROR "'${projectPrefix}DOWNCAST_MODE' should be one of ${downcast_mode_options} ('${${projectPrefix}DOWNCAST_MODE}' received)")
|
||||||
else()
|
else()
|
||||||
message(STATUS "${ProjectPrefix}DOWNCAST_MODE: ${${ProjectPrefix}DOWNCAST_MODE}")
|
message(STATUS "${projectPrefix}DOWNCAST_MODE: ${${projectPrefix}DOWNCAST_MODE}")
|
||||||
target_compile_definitions(mp-units-core INTERFACE ${ProjectPrefix}DOWNCAST_MODE=${downcast_mode})
|
target_compile_definitions(mp-units-core INTERFACE ${projectPrefix}DOWNCAST_MODE=${downcast_mode})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user