Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with latest compilers (gcc 12, clang 15) #44

Open
gonsolo opened this issue Jul 21, 2023 · 0 comments
Open

Compile with latest compilers (gcc 12, clang 15) #44

gonsolo opened this issue Jul 21, 2023 · 0 comments

Comments

@gonsolo
Copy link

gonsolo commented Jul 21, 2023

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c67a6b0..98e3db2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ endif (POLICY CMP0048)
 
 project(optix7course VERSION 1.0.1)
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.25)
 if (NOT WIN32)
 # visual studio doesn't like these (not need them):
 set (CMAKE_CXX_FLAGS "--std=c++11")
diff --git a/common/gdt/gdt/gdt.h b/common/gdt/gdt/gdt.h
index b4eaa48..c3a5845 100644
--- a/common/gdt/gdt/gdt.h
+++ b/common/gdt/gdt/gdt.h
@@ -126,7 +126,7 @@ namespace gdt {
   // inline __both__ float cos(float f) { return ::cosf(f); }
   // inline __both__ double cos(double f) { return ::cos(f); }
 
-  using ::saturate;
+  //using ::saturate;
 #else
   using std::min;
   using std::max;
diff --git a/example07_firstRealModel/Model.cpp b/example07_firstRealModel/Model.cpp
index bb14939..f5114e9 100644
--- a/example07_firstRealModel/Model.cpp
+++ b/example07_firstRealModel/Model.cpp
@@ -20,7 +20,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {
diff --git a/example08_addingTextures/Model.cpp b/example08_addingTextures/Model.cpp
index 8452638..e623a48 100644
--- a/example08_addingTextures/Model.cpp
+++ b/example08_addingTextures/Model.cpp
@@ -24,7 +24,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {
diff --git a/example09_shadowRays/Model.cpp b/example09_shadowRays/Model.cpp
index 8452638..e623a48 100644
--- a/example09_shadowRays/Model.cpp
+++ b/example09_shadowRays/Model.cpp
@@ -24,7 +24,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {
diff --git a/example10_softShadows/Model.cpp b/example10_softShadows/Model.cpp
index 0579863..cc4fd57 100644
--- a/example10_softShadows/Model.cpp
+++ b/example10_softShadows/Model.cpp
@@ -24,7 +24,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {
diff --git a/example11_denoiseColorOnly/Model.cpp b/example11_denoiseColorOnly/Model.cpp
index 0579863..cc4fd57 100644
--- a/example11_denoiseColorOnly/Model.cpp
+++ b/example11_denoiseColorOnly/Model.cpp
@@ -24,7 +24,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {
diff --git a/example12_denoiseSeparateChannels/Model.cpp b/example12_denoiseSeparateChannels/Model.cpp
index 0579863..cc4fd57 100644
--- a/example12_denoiseSeparateChannels/Model.cpp
+++ b/example12_denoiseSeparateChannels/Model.cpp
@@ -24,7 +24,7 @@
 //std
 #include <set>
 
-namespace std {
+namespace tinyobj {
   inline bool operator<(const tinyobj::index_t &a,
                         const tinyobj::index_t &b)
   {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant