Browse Source

cmake fixes

Closes GH-640.
v0.7.4-release
Daniel Gröber 14 years ago
committed by Ryan Dahl
parent
commit
71a8a3b78c
  1. 1
      CMakeLists.txt
  2. 6
      cmake/configure.cmake
  3. 4
      cmake/node_build.cmake

1
CMakeLists.txt

@ -64,6 +64,7 @@ message(" Version: ${node_version_string}")
message(" Prefix: ${PREFIX}")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" Architecture: ${CMAKE_SYSTEM_PROCESSOR}")
message(" Platform: ${node_platform}")
if(SHARED_V8)
message(" V8: ${V8_LIBRARY_PATH}")

6
cmake/configure.cmake

@ -37,6 +37,10 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -Wall -g -Wextra -DDEBUG $ENV{CXXFLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-g -O3 -DNDEBUG $ENV{CFLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG $ENV{CXXFLAGS}")
if(NOT ${node_platform} MATCHES "Windows")
add_definitions(-D__POSIX__=1)
endif()
if(${node_platform} MATCHES sunos)
add_definitions(-threads)
elseif(NOT ${node_platform} MATCHES cygwin*)
@ -58,7 +62,7 @@ else()
endif()
add_definitions(
-DPLATFORM=${node_platform}
-DPLATFORM="${node_platform}"
-DX_STACKSIZE=65536
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64

4
cmake/node_build.cmake

@ -35,6 +35,7 @@ set(node_sources
src/node_timer.cc
src/node_script.cc
src/node_os.cc
src/node_dtrace.cc
src/node_natives.h
${node_extra_src})
@ -47,6 +48,9 @@ else()
endif()
get_directory_property(compile_defs COMPILE_DEFINITIONS)
foreach(def ${compile_defs})
# escape " in CPPFLAGS (-DPLATFORM="${node_platform}" would fuck stuff up
# otherwise)
string(REPLACE "\"" "\\\"" def ${def})
set(CPPFLAGS "${CPPFLAGS} -D${def}")
endforeach()

Loading…
Cancel
Save