# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
project(vulkan-cpu CXX C)
if(NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(demo)
add_subdirectory(generate_spirv_parser)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
find_package(SDL2 REQUIRED)
string(STRIP ${SDL2_LIBRARIES} libraries) # workaround SDL2 automake bug
set(sources demo.cpp)
add_executable(demo ${sources})
target_include_directories(demo PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(demo ${libraries} vulkan_cpu_spirv vulkan_cpu_util vulkan_cpu_pipeline vulkan_cpu_vulkan)
+set_target_properties(demo PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ CXX_VISIBILITY_PRESET hidden)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources ast.cpp
generate.cpp
generate_spirv_parser.cpp
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources image.cpp)
add_library(vulkan_cpu_image STATIC ${sources})
target_link_libraries(vulkan_cpu_image vulkan_cpu_util vulkan_cpu_llvm_wrapper vulkan_cpu_vulkan)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources json.cpp
location.cpp
parser.cpp
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources llvm_wrapper.cpp
orc_compile_stack.cpp)
add_library(vulkan_cpu_llvm_wrapper STATIC ${sources})
-if(1)
+if(0)
llvm_map_components_to_libnames(llvm_libraries core native analysis orcjit mcjit nativecodegen ipo scalaropts vectorize)
else()
set(llvm_libraries LLVM)
throw std::runtime_error("LLVMInitializeNativeAsmPrinter failed");
if(::LLVMInitializeNativeDisassembler() != 0)
throw std::runtime_error("LLVMInitializeNativeDisassembler failed");
+#if 0
static struct LLVM_shutdown
{
~LLVM_shutdown()
::LLVMShutdown();
}
} llvm_shutdown;
+#endif
}
LLVM_string Target::get_process_target_triple()
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources pipeline.cpp)
add_library(vulkan_cpu_pipeline STATIC ${sources})
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources literal_string.cpp)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources core_instructions.cpp
fragment_entry_point.cpp
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
include(TestBigEndian)
TEST_BIG_ENDIAN(is_big_endian)
if(is_big_endian)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(sources vulkan.cpp)
add_library(vulkan_cpu_vulkan STATIC ${sources})
target_compile_definitions(vulkan_cpu_vulkan PUBLIC VK_NO_PROTOTYPES)