OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogutil commits / 122d036

Remove ancient Win32 stuffs
122d0369aa06536038c82801ee27fe0f73a6a6f2
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-19T02:10:26.000Z

Changed files (1) +1 -42

CMakeLists.txt +1 -42
……@@ -43,54 +43,13 @@ ENDIF (CMAKE_BUILD_TYPE STREQUAL "")
4343MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
4444
4545ADD_DEFINITIONS(-DPROJECT_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
46 -DPROJECT_BINARY_DIR="${CMAKE_BINARY_DIR}")
46 -DPROJECT_BINARY_DIR="${CMAKE_BINARY_DIR}")
4747
4848# Add the 'cmake' dir to cmake's module search path.
4949SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
5050
5151include(cmake/OpenCogGccOptions.cmake)
5252
53# ------------------------------------------------------
54IF (WIN32) # Windows host but not cygwin
55 OPTION(WINDOWS_NATIVE "Build natively on Windows using MSVC" ON)
56 IF (NOT WINDOWS_NATIVE)
57 MESSAGE(FATAL_ERROR "You must use Cygwin if compiling under Windows, or enable WINDOWS_NATIVE option.")
58 ENDIF()
59
60 ADD_DEFINITIONS(-DWIN32)
61 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
62
63 IF (WINDOWS_NATIVE)
64 MESSAGE(STATUS "Building natively on Windows with MSVC")
65 ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
66 ADD_DEFINITIONS(-DNOMINMAX)
67 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
68 ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
69 ADD_DEFINITIONS(-D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING)
70 SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
71 ENDIF()
72
73 # Previous definitions used for win32 (non cygwin) compilation.
74 # For reference only
75
76 # ADD_DEFINITIONS(-DWIN32_NOT_UNIX)
77 # FIND_PACKAGE(PThreads REQUIRED)
78 # FIND_PACKAGE(STLPort REQUIRED)
79 # INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include/win32" ${PTHREADS_INCLUDE_DIR} ${STLPORT_INCLUDE_DIR})
80 # ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
81ENDIF (WIN32)
82
83# Do the cygwin build
84IF (CYGWIN)
85 ADD_DEFINITIONS(-DCYGWIN)
86 LINK_LIBRARIES(pthread)
87ELSEIF (WINDOWS_NATIVE)
88 # Use Windows native threading
89 ADD_DEFINITIONS(-DWIN32_THREADS)
90 # Windows SDK provides threading support
91 # No need for explicit pthread linkage
92ENDIF (CYGWIN)
93
9453# ===================================================================
9554# Check for existence of various required, optional packages.
9655