Skip to content

Commit

Permalink
Set CMake generator platform on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwinger committed May 25, 2023
1 parent 298217c commit 3af46ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ if(MSVC)
add_compile_definitions(_USE_MATH_DEFINES)
add_compile_definitions(NOMINMAX)
add_compile_definitions(ARROW_STATIC PARQUET_STATIC)
# TODO (bmwinger): Figure out if this can be set automatically by cmake,
# or at least better integrated with user-specified options
# For now, hardcode _AMD64_
# CMAKE_GENERATOR_PLATFORM can be used for visual studio builds, but not for ninja
add_compile_definitions(_AMD64_)
endif()
if(CMAKE_BUILD_TYPE MATCHES Release)
if(MSVC)
Expand Down
3 changes: 0 additions & 3 deletions src/storage/buffer_manager/vm_region.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "storage/buffer_manager/vm_region.h"

#ifdef _WIN32
// FIXME: should be set by cmake
// Ninja doesn't seem to support CMAKE_GENERATOR_PLATFORM=x64
#define _AMD64_
#include <errhandlingapi.h>
#include <handleapi.h>
#include <memoryapi.h>
Expand Down
3 changes: 0 additions & 3 deletions src/storage/copier/npy_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#include <sys/stat.h>

#ifdef _WIN32
// FIXME: should be set by cmake
// Ninja doesn't seem to support CMAKE_GENERATOR_PLATFORM=x64
#define _AMD64_
#include <errhandlingapi.h>
#include <handleapi.h>
#include <memoryapi.h>
Expand Down

0 comments on commit 3af46ed

Please sign in to comment.