diff --git a/.travis.yml b/.travis.yml index 29f72a6..2566ada 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ matrix: compiler: gcc before_script: - pip install --user cpp-coveralls + - pip install cmakelint env: - BASIC_LINUX_GCC=yes addons: @@ -132,6 +133,12 @@ script: export CXX=${FORT_CXX_COMPILER}; fi + # check CMakeLists.txt + - | + if [ "${BASIC_LINUX_GCC}" = "yes" ]; then + cmakelint CMakeLists.txt + fi + # basic build with old c standard (use gnu89 instead of c89 because some functions are not defines in c89) - cd lib - ${CC} -Wall -Wextra -Werror --std=gnu89 -DFT_CONGIG_HAVE_WCHAR fort.c -c -o fort.o diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b23f0f..8aa6307 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ endif("${FORT_COMPILER}" STREQUAL "MSVC") # Sources and executables # ------------------------------------------------------------------------------ -FILE(GLOB_RECURSE FortHeaders "lib/*.h" "lib/*.hpp" "tests/*.h" "tests/*.hpp" "src/*.h") +file(GLOB_RECURSE FortHeaders "lib/*.h" "lib/*.hpp" "tests/*.h" "tests/*.hpp" "src/*.h") add_custom_target(headers SOURCES ${FortHeaders}) @@ -151,9 +151,9 @@ add_executable(${PROJECT_NAME}_test_cpp ${TEST_SOURCES_CPP}) if(FORT_CXX_BUILD) - SET_SOURCE_FILES_PROPERTIES(${FORT_DEV_SOURCES} PROPERTIES LANGUAGE CXX) - SET_SOURCE_FILES_PROPERTIES(${EXAMPLE_SOURCES} PROPERTIES LANGUAGE CXX) - SET_SOURCE_FILES_PROPERTIES(${TEST_SOURCES} PROPERTIES LANGUAGE CXX) + set_source_files_properties(${FORT_DEV_SOURCES} PROPERTIES LANGUAGE CXX) + set_source_files_properties(${EXAMPLE_SOURCES} PROPERTIES LANGUAGE CXX) + set_source_files_properties(${TEST_SOURCES} PROPERTIES LANGUAGE CXX) endif(FORT_CXX_BUILD)