mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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
This commit is contained in:
committed by
Tom Hughes
parent
a530c23d96
commit
ea29cb4e46
@@ -12,7 +12,7 @@ option(V8_SNAPSHOT "turn on snapshot when building stock v8")
|
||||
|
||||
|
||||
# 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
|
||||
include("cmake/configure.cmake")
|
||||
@@ -27,10 +27,12 @@ include("cmake/node_build.cmake")
|
||||
include("cmake/v8_build.cmake")
|
||||
|
||||
# docs
|
||||
## might want to move this to doc/CMakeLists.txt
|
||||
include("cmake/docs.cmake")
|
||||
|
||||
# tests
|
||||
include("cmake/tests.cmake")
|
||||
enable_testing()
|
||||
add_subdirectory("test/")
|
||||
|
||||
# package
|
||||
include("cmake/package.cmake")
|
||||
@@ -64,7 +66,7 @@ message(" RT library: ${RT}")
|
||||
message(" DL library: ${DL}")
|
||||
|
||||
if(${OPENSSL_FOUND} MATCHES TRUE)
|
||||
message(" OpenSSL: Found!")
|
||||
message(" OpenSSL: ${OPENSSL_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
# message(" CCFLAGS: ${CCFLAGS}")
|
||||
|
||||
@@ -35,8 +35,7 @@ if(NOT SHARED_V8)
|
||||
PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
|
||||
|
||||
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER 2.8)
|
||||
if(CMAKE_VERSION VERSION_GREATER 2.8 OR CMAKE_VERSION VERSION_EQUAL 2.8)
|
||||
# use ExternalProject for CMake >2.8
|
||||
include(ExternalProject)
|
||||
|
||||
@@ -55,7 +54,7 @@ if(NOT SHARED_V8)
|
||||
)
|
||||
|
||||
add_dependencies(node v8_extprj)
|
||||
else(CAMKE_VERSION VERSION_GREATER 2.8)
|
||||
else()
|
||||
# copy v8 sources inefficiently with CMake versions <2.8
|
||||
file(GLOB_RECURSE v8_sources RELATIVE ${PROJECT_SOURCE_DIR} deps/v8/*)
|
||||
|
||||
|
||||
1
deps/libeio/CMakeLists.txt
vendored
1
deps/libeio/CMakeLists.txt
vendored
@@ -5,7 +5,6 @@ if(!${CMAKE_USE_PTHREADS_INIT})
|
||||
message(FATAL_ERROR "Unable to find pthreads")
|
||||
endif()
|
||||
|
||||
include_directories(${platform})
|
||||
add_definitions(-DHAVE_CONFIG_H=1 -D_GNU_SOURCE)
|
||||
|
||||
check_function_exists(futimes HAVE_FUTIMES)
|
||||
|
||||
@@ -10,12 +10,12 @@ else()
|
||||
get_target_property(node_bin node LOCATION)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
file(GLOB_RECURSE node_tests ${CMAKE_SOURCE_DIR}/test/*)
|
||||
|
||||
# add all tests with add_test
|
||||
foreach(test ${node_tests})
|
||||
if(test MATCHES ".*/test-[^./\ ]*.\\.js" AND NOT test MATCHES ".*disabled.*"
|
||||
AND NOT test MATCHES ".*pummel.*")
|
||||
if(test MATCHES ".*/test-[^./\ ]*.\\.js"
|
||||
AND NOT test MATCHES ".*disabled.*")
|
||||
|
||||
# build a fancy name for each test
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR}/test/ "" test_name ${test})
|
||||
@@ -27,6 +27,8 @@ foreach(test ${node_tests})
|
||||
endif()
|
||||
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)
|
||||
|
||||
add_custom_command(
|
||||
Reference in New Issue
Block a user