diff --git a/.travis.yml b/.travis.yml index 87c78a7..8d42327 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ matrix: - g++-5 sources: *sources script: > - cmake -DCXXOPTS_BUILD_TESTS=ON -DCMAKE_CXX_COMPILER=$COMPILER + cmake -Werror=dev -DCXXOPTS_BUILD_TESTS=ON -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_CXX_FLAGS=$CXXFLAGS $UNICODE_OPTIONS $CMAKE_OPTIONS . && make && make ARGS=--output-on-failure test diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e5043d..7db33e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,9 @@ project(cxxopts LANGUAGES CXX ) +# Must include after the project call due to GNUInstallDirs requiring a language be enabled (IE. CXX) +include(GNUInstallDirs) + # Determine whether this is a standalone project or included by other projects set(CXXOPTS_STANDALONE_PROJECT OFF) if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) diff --git a/cmake/cxxopts.cmake b/cmake/cxxopts.cmake index 9ef6caa..ef975b8 100644 --- a/cmake/cxxopts.cmake +++ b/cmake/cxxopts.cmake @@ -22,7 +22,6 @@ if (CMAKE_VERSION VERSION_GREATER 3.10 OR CMAKE_VERSION VERSION_EQUAL 3.10) include_guard() endif() -include(GNUInstallDirs) include(CMakePackageConfigHelpers) function(cxxopts_getversion version_arg)