Browse Source

cmake cleanup

* Removed useless include_directories
 * Print ssl library path in build summary
 * ExternalProject also exists on 2.8.0
 * include pummel tests when testing with ctest
 * Moved tests.cmake to test/CMakeList.txt
 * Removed inconsistent, unnecessary condition in else
v0.7.4-release
Daniel Gröber 14 years ago
committed by Tom Hughes
parent
commit
ea29cb4e46
  1. 8
      CMakeLists.txt
  2. 5
      cmake/v8_build.cmake
  3. 1
      deps/libeio/CMakeLists.txt
  4. 8
      test/CMakeLists.txt

8
CMakeLists.txt

@ -12,7 +12,7 @@ option(V8_SNAPSHOT "turn on snapshot when building stock v8")
# cmake policies to get rid of some warnings # cmake policies to get rid of some warnings
cmake_policy(SET CMP0009 NEW) cmake_policy(SET CMP0009 NEW) # GLOB_RECURSE should no follow symlinks
# generic cmake configuration # generic cmake configuration
include("cmake/configure.cmake") include("cmake/configure.cmake")
@ -27,10 +27,12 @@ include("cmake/node_build.cmake")
include("cmake/v8_build.cmake") include("cmake/v8_build.cmake")
# docs # docs
## might want to move this to doc/CMakeLists.txt
include("cmake/docs.cmake") include("cmake/docs.cmake")
# tests # tests
include("cmake/tests.cmake") enable_testing()
add_subdirectory("test/")
# package # package
include("cmake/package.cmake") include("cmake/package.cmake")
@ -64,7 +66,7 @@ message(" RT library: ${RT}")
message(" DL library: ${DL}") message(" DL library: ${DL}")
if(${OPENSSL_FOUND} MATCHES TRUE) if(${OPENSSL_FOUND} MATCHES TRUE)
message(" OpenSSL: Found!") message(" OpenSSL: ${OPENSSL_LIBRARIES}")
endif() endif()
# message(" CCFLAGS: ${CCFLAGS}") # message(" CCFLAGS: ${CCFLAGS}")

5
cmake/v8_build.cmake

@ -35,8 +35,7 @@ if(NOT SHARED_V8)
PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn}) PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
if(CMAKE_VERSION VERSION_GREATER 2.8 OR CMAKE_VERSION VERSION_EQUAL 2.8)
if(CMAKE_VERSION VERSION_GREATER 2.8)
# use ExternalProject for CMake >2.8 # use ExternalProject for CMake >2.8
include(ExternalProject) include(ExternalProject)
@ -55,7 +54,7 @@ if(NOT SHARED_V8)
) )
add_dependencies(node v8_extprj) add_dependencies(node v8_extprj)
else(CAMKE_VERSION VERSION_GREATER 2.8) else()
# copy v8 sources inefficiently with CMake versions <2.8 # copy v8 sources inefficiently with CMake versions <2.8
file(GLOB_RECURSE v8_sources RELATIVE ${PROJECT_SOURCE_DIR} deps/v8/*) file(GLOB_RECURSE v8_sources RELATIVE ${PROJECT_SOURCE_DIR} deps/v8/*)

1
deps/libeio/CMakeLists.txt

@ -5,7 +5,6 @@ if(!${CMAKE_USE_PTHREADS_INIT})
message(FATAL_ERROR "Unable to find pthreads") message(FATAL_ERROR "Unable to find pthreads")
endif() endif()
include_directories(${platform})
add_definitions(-DHAVE_CONFIG_H=1 -D_GNU_SOURCE) add_definitions(-DHAVE_CONFIG_H=1 -D_GNU_SOURCE)
check_function_exists(futimes HAVE_FUTIMES) check_function_exists(futimes HAVE_FUTIMES)

8
cmake/tests.cmake → test/CMakeLists.txt

@ -10,12 +10,12 @@ else()
get_target_property(node_bin node LOCATION) get_target_property(node_bin node LOCATION)
endif() endif()
enable_testing()
file(GLOB_RECURSE node_tests ${CMAKE_SOURCE_DIR}/test/*) file(GLOB_RECURSE node_tests ${CMAKE_SOURCE_DIR}/test/*)
# add all tests with add_test
foreach(test ${node_tests}) foreach(test ${node_tests})
if(test MATCHES ".*/test-[^./\ ]*.\\.js" AND NOT test MATCHES ".*disabled.*" if(test MATCHES ".*/test-[^./\ ]*.\\.js"
AND NOT test MATCHES ".*pummel.*") AND NOT test MATCHES ".*disabled.*")
# build a fancy name for each test # build a fancy name for each test
string(REPLACE ${CMAKE_SOURCE_DIR}/test/ "" test_name ${test}) string(REPLACE ${CMAKE_SOURCE_DIR}/test/ "" test_name ${test})
@ -27,6 +27,8 @@ foreach(test ${node_tests})
endif() endif()
endforeach() endforeach()
# the CTest custom config makes ctest recreate the tmp directory before and after
# each run
configure_file(${CMAKE_SOURCE_DIR}/cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake COPYONLY)
add_custom_command( add_custom_command(
Loading…
Cancel
Save