From a968fadb5f933900c5c028c0bf24ecb0e4dc4c3e Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Sun, 5 May 2019 15:12:43 +0300 Subject: [PATCH] [cmake] Disable tools by default but enable in CI --- .appveyor.yml | 2 +- .travis.yml | 2 +- CMakeLists.txt | 1 + src/CMakeLists.txt | 11 +++++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 15db3964..7604fda7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -62,7 +62,7 @@ build_script: cd build - cmake -DCMAKE_PREFIX_PATH=%Qt5_DIR% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_SPICE=ON .. + cmake -DCMAKE_PREFIX_PATH=%Qt5_DIR% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_SPICE=ON -DENABLE_TOOLS=ON .. cmake --build . --config Release -- /maxcpucount:4 /nologo diff --git a/.travis.yml b/.travis.yml index 33b9804e..4ebe2e0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_script: - cd build script: -- cmake -DENABLE_SPICE=ON .. +- cmake -DENABLE_SPICE=ON -DENABLE_TOOLS=ON .. - make -j $(nproc || echo 4) addons: diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ca7dda0..0724c608 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ option(ENABLE_GTK "Build GTK2 frontend (Unix only)? (Default: off)" OFF) option(ENABLE_QT "Build Qt frontend? (Default: on)" ON) option(ENABLE_WIN "Build Windows native frontend? (Default: on)" ON) option(ENABLE_THEORA "Support video capture to OGG Theora? (Default: on)" ON) +option(ENABLE_TOOLS "Build different tools? (Default: off)" OFF) option(NATIVE_OSX_APP "Support native OSX paths read data from (Default: off)" OFF) if(NOT CMAKE_BUILD_TYPE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c174519..c6bfd287 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,11 +9,14 @@ set(CELESTIA_LIBS celutil ) -foreach(lib ${CELESTIA_LIBS} tools) +foreach(lib ${CELESTIA_LIBS}) add_subdirectory(${lib}) endforeach() -if (NOT WIN32) - add_executable(buildstardb buildstardb.cpp) - cotire(buildstardb) +if (ENABLE_TOOLS) + add_subdirectory(tools) + if (NOT WIN32) + add_executable(buildstardb buildstardb.cpp) + cotire(buildstardb) + endif() endif()