mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Tutorial: Improve Step 3
* Move `option(USE_MYMATH...` to the same location in all CMakeLists files
This commit is contained in:
@@ -7,15 +7,15 @@ project(Tutorial VERSION 1.0)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# should we use our own math functions
|
||||
option(USE_MYMATH "Use tutorial provided math implementation" ON)
|
||||
|
||||
# does this system provide the log and exp functions?
|
||||
include(CheckSymbolExists)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "m")
|
||||
check_symbol_exists(log "math.h" HAVE_LOG)
|
||||
check_symbol_exists(exp "math.h" HAVE_EXP)
|
||||
|
||||
# should we use our own math functions
|
||||
option(USE_MYMATH "Use tutorial provided math implementation" ON)
|
||||
|
||||
# configure a header file to pass the version number only
|
||||
configure_file(TutorialConfig.h.in TutorialConfig.h)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user