Include the tests and apps directories at the _end_, since order in the

cmake rules matters, and fix compile warnings now that we're building
those sources with all the regular flags.
This commit is contained in:
Eric Haszlakiewicz
2022-05-30 14:33:16 +00:00
parent 86b46cac07
commit 6ba1adf8ef
7 changed files with 171 additions and 171 deletions

View File

@@ -42,16 +42,6 @@ endif()
include(CTest)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
(NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013
)
add_subdirectory(tests)
endif()
if (NOT MSVC) # cmd line apps don't built on Windows currently.
add_subdirectory(apps)
endif()
# Set some packaging variables.
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
@@ -538,3 +528,13 @@ endif ()
install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/json-c)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
(NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013
)
add_subdirectory(tests)
endif()
if (NOT MSVC) # cmd line apps don't built on Windows currently.
add_subdirectory(apps)
endif()