aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt24
-rw-r--r--cmake/README.txt19
-rw-r--r--test/CMakeLists.txt4
3 files changed, 27 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd13ef62..c8ec550d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ if(WIN32 OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
# pc/config.h. With these settings and DYNAMIC=1
# it looks like functions in dynamic libs (extensions) can
# be invoked on Windows.
+ DefineConfigHValue(HAVE_GETSYSTEMTIMEASFILETIME 1)
set (GAWK_SOURCES ${GAWK_SOURCES} regex.c pc/getid.c pc/gawkmisc.pc pc/popen.c)
include_directories(${CMAKE_SOURCE_DIR}/pc)
endif()
@@ -93,18 +94,11 @@ add_executable (gawk ${GAWK_SOURCES} ${BISON_awkgram_OUTPUTS})
target_link_libraries (gawk m ${EXTRA_LIBS})
install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin)
-if (CMAKE_HOST_UNIX)
- # Beware: before building the extension, -DGAWK gets undefined.
- add_subdirectory(extension)
-
- if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
- enable_testing()
- add_subdirectory(test)
- endif()
-
- add_subdirectory(doc)
-
- include(InstallRequiredSystemLibraries)
- set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
- include(cmake/package.cmake)
-endif()
+# Beware: before building the extension, -DGAWK gets undefined.
+add_subdirectory(extension)
+enable_testing()
+add_subdirectory(test)
+add_subdirectory(doc)
+include(InstallRequiredSystemLibraries)
+set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
+include(cmake/package.cmake)
diff --git a/cmake/README.txt b/cmake/README.txt
index f4feaf7f..60dde159 100644
--- a/cmake/README.txt
+++ b/cmake/README.txt
@@ -62,7 +62,20 @@ Use "make package". The exact kind of installable file depends on your
operating system and defaults to TGZ.
- Can I build an executable that runs on any Win32 platform ?
-It is possible to build for the target Win32, but only with cross-compilers
-on certain platforms. You need a MinGW cross-compiler and the NSIS package
-builder.
+Yes, there are two ways of doing this.
+In both cases you need a MinGW compiler and the NSIS package builder
+installed on the host that shall do the build.
+ http://sourceforge.net/projects/mingw
+ http://sourceforge.net/projects/nsis
+When installed properly, the NSIS tool can even build an installer file
+(a single .exe file that unpacks, registers and installs the gawk executable
+and several other files).
+1. way: native build on a Win32 platform
+ http://www.cmake.org/cmake/help/runningcmake.html
+ After clicking "Configure" select the MinGW option with the default native compiler
+ In the build directory, the command "mingw32-make" will build the gawk.exe
+ The command "mingw32-make package" will build installer file
+2. way: build with cross-compiler on a Linux platform like Ubuntu 12.04 LTS
+ Proceed as describe above for cross-compilers.
+ The command "make ; make package" will build gawk.exe and the installer file
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5f36c754..ba1cc5c6 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -30,8 +30,8 @@ execute_process(
OUTPUT_VARIABLE BASIC_TESTS
)
-string(REGEX REPLACE "Gt-dummy:\n" "" BASIC_TESTS ${BASIC_TESTS})
-string(REGEX REPLACE ":\n" ";" BASIC_TESTS ${BASIC_TESTS})
+string(REGEX REPLACE "Gt-dummy:\n" "" BASIC_TESTS "${BASIC_TESTS}")
+string(REGEX REPLACE ":\n" ";" BASIC_TESTS "${BASIC_TESTS}")
foreach(testcase ${BASIC_TESTS} )
set(options "")
if(${testcase} STREQUAL lintold)