forked from aws/aws-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
1283 lines (1136 loc) · 51.9 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# minimum version of cmake that
# (1) supports ExternalProject_Add URL_HASH
# (2) correctly extracts OPENSSL's version number from openssl/opensslv.h in version 1.0.2d
cmake_minimum_required (VERSION 3.1.2)
# Cmake invocation variables:
# CUSTOM_MEMORY_MANAGEMENT - if set to 1, generates the sdk project files with custom memory management enabled, otherwise disables it
# STATIC_LINKING - if set to 1, generates the sdk project files to build static libraries, otherwise disables it
# NO_HTTP_CLIENT - if set to 1, will not include any platform-specific http client implementations; you will need to provide one via an injected HttpClientFactory implementation
# NO_ENCRYPTION - if set to 1, will not include any platform-specific encryption implementations; you will need to provide one
# BUILD_ONLY - a semi-colon delimited list, if this is set we will build only the projects listed. Core will always be built as will its unit tests.
# Also if a high level client is specified then we will build its dependencies as well. If a project has tests, the tests will be built.
# REGENERATE_CLIENTS - all clients being built on this run will be regenerated from the api definitions, this option involves some setup of python, java 8, jdk 1.8, and maven
# ADD_CUSTOM_CLIENTS - semi-colon delimited list of format serviceName=<yourserviceName>,version=<theVersionNumber>;serviceName2=<yourOtherServiceName>,version=<versionNumber2>
# to use these arguments, you should add the api definition .normal.json file for your service to the api-description folder in the generator.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
# there isn't a reliable way of detecting what architecture we want to build for in a cross-compiling environment, so force the user
# to specify on the command line. Since testing string equality is ugly and awkward in cmake, we use the specified architecture
# to conditionally set a symbol to 1 so that we can continue to just do "if (SYMBOL)" for our conditional execution
SET(PLATFORM_WINDOWS 0)
SET(PLATFORM_LINUX 0)
SET(PLATFORM_ANDROID 0)
SET(PLATFORM_APPLE 0)
if("${TARGET_ARCH}" STREQUAL "WINDOWS")
SET(PLATFORM_WINDOWS 1)
elseif("${TARGET_ARCH}" STREQUAL "LINUX")
SET(PLATFORM_LINUX 1)
elseif("${TARGET_ARCH}" STREQUAL "APPLE")
SET(PLATFORM_APPLE 1)
elseif("${TARGET_ARCH}" STREQUAL "ANDROID")
SET(PLATFORM_ANDROID 1)
SET(CMAKE_TOOLCHAIN_FILE ./android-build/android.toolchain.cmake)
else()
message(STATUS "TARGET_ARCH not specified; inferring host OS to be platform compilation target")
if(WIN32)
SET(PLATFORM_WINDOWS 1)
elseif(APPLE)
SET(PLATFORM_APPLE 1)
elseif(UNIX)
SET(PLATFORM_LINUX 1)
else()
message(FATAL_ERROR "Unknown host OS; unable to determine platform compilation target")
endif()
endif()
if(PLATFORM_ANDROID)
# minimum version of cmake that
# (1) supports ExternalProject_Add URL_HASH
# (2) correctly extracts OPENSSL's version number from openssl/opensslv.h in version 1.0.2d
cmake_minimum_required (VERSION 3.1.2)
else()
cmake_minimum_required (VERSION 2.8)
endif()
SET(PYTHON_CMD "python")
if(PLATFORM_WINDOWS)
message(STATUS "Generating windows build config")
add_definitions("-DAWS_SDK_PLATFORM_WINDOWS")
set(SDK_INSTALL_BINARY_PREFIX "windows")
SET(PYTHON_CMD "py")
elseif(PLATFORM_LINUX)
message(STATUS "Generating linux build config")
add_definitions("-DAWS_SDK_PLATFORM_LINUX")
set(SDK_INSTALL_BINARY_PREFIX "linux")
elseif(PLATFORM_APPLE)
message(STATUS "Generating Mac OSX/IOS build config")
add_definitions("-DAWS_SDK_PLATFORM_APPLE")
set(SDK_INSTALL_BINARY_PREFIX "mac")
elseif(PLATFORM_ANDROID)
message(STATUS "Generating android build config")
add_definitions("-DAWS_SDK_PLATFORM_ANDROID")
set(SDK_INSTALL_BINARY_PREFIX "android")
else()
message(FATAL_ERROR "Unknown target platform. How did this happen?")
endif()
# shared libraries as intermediate (non-leaf) targets are not supported in android due to std::string issues
if("${STATIC_LINKING}" STREQUAL "1")
SET(BUILD_SHARED_LIBS 0)
SET(ARCHIVE_DIRECTORY "lib")
message(STATUS "Dynamic linking disabled")
else()
SET(BUILD_SHARED_LIBS 1)
SET(ARCHIVE_DIRECTORY "bin")
message(STATUS "Dynamic linking enabled")
endif()
# Http client control
# After this section runs, client availability is technically platform-independent (ie we use the client #defines rather than a mess of platform #defines)
# on Windows, set CURL_DIR to a valid curl install directory in order to enable the curl client
set(ENABLE_CURL_CLIENT 0)
set(ENABLE_WINDOWS_CLIENT 0)
if(NOT "${NO_HTTP_CLIENT}" STREQUAL "1")
if(PLATFORM_WINDOWS)
if(DEFINED CURL_DIR)
set(ENABLE_CURL_CLIENT 1)
set(CURL_INCLUDE_DIR "${CURL_DIR}\\include")
set(CURL_LIBRARY_DIR "${CURL_DIR}\\lib")
include_directories(${CURL_INCLUDE_DIR})
link_directories(${CURL_LIBRARY_DIR})
else()
set(ENABLE_WINDOWS_CLIENT 1)
endif()
elseif(PLATFORM_LINUX OR PLATFORM_APPLE OR PLATFORM_ANDROID)
set(ENABLE_CURL_CLIENT 1)
endif()
if(ENABLE_CURL_CLIENT)
add_definitions(-DENABLE_CURL_CLIENT)
message(STATUS "Http client: Curl")
if(TEST_CERT_PATH)
message(STATUS "Setting curl cert path to ${TEST_CERT_PATH}")
add_definitions(-DTEST_CERT_PATH="\"${TEST_CERT_PATH}\"")
endif()
elseif(ENABLE_WINDOWS_CLIENT)
add_definitions(-DENABLE_WINDOWS_CLIENT)
message(STATUS "Http client: WinHttp")
else()
message(FATAL_ERROR "No http client available for target platform and client injection not enabled (-DNO_HTTP_CLIENT=1)")
endif()
else()
message(STATUS "You will need to inject an http client implementation before making any http requests!")
endif()
# Encryption control
# After this section runs, the encryption implementation is technically platform-independent (ie we use the enable #defines rather than a mess of platform #defines)
set(ENABLE_BCRYPT_ENCRYPTION 0)
set(ENABLE_OPENSSL_ENCRYPTION 0)
set(ENABLE_COMMONCRYPTO_ENCRYPTION 0)
set(ENABLE_INJECTED_ENCRYPTION 0)
if(NOT "${NO_ENCRYPTION}" STREQUAL "1")
if(PLATFORM_WINDOWS)
set(ENABLE_BCRYPT_ENCRYPTION 1)
elseif(PLATFORM_LINUX OR PLATFORM_ANDROID)
set(ENABLE_OPENSSL_ENCRYPTION 1)
elseif(PLATFORM_APPLE)
set(ENABLE_COMMONCRYPTO_ENCRYPTION 1)
else()
message(FATAL_ERROR "No encryption available for target platform and injection not enabled (-DNO_ENCRYPTION=1)")
endif()
else()
set(ENABLE_INJECTED_ENCRYPTION 1)
endif()
if(ENABLE_BCRYPT_ENCRYPTION)
add_definitions(-DENABLE_BCRYPT_ENCRYPTION)
message(STATUS "Encryption: Bcrypt")
elseif(ENABLE_OPENSSL_ENCRYPTION)
add_definitions(-DENABLE_OPENSSL_ENCRYPTION)
message(STATUS "Encryption: Openssl")
elseif(ENABLE_COMMONCRYPTO_ENCRYPTION)
add_definitions(-DENABLE_COMMONCRYPTO_ENCRYPTION)
message(STATUS "Encryption: CommonCrypto")
elseif(ENABLE_INJECTED_ENCRYPTION)
add_definitions(-DENABLE_INJECTED_ENCRYPTION)
message(STATUS "Encryption: None")
message(STATUS "You will need to inject an encryption implementation before making any http requests!")
endif()
project(aws-sdk-cpp-all)
# install setup
# This install section must come after the initial "project(..)" declaration since that's when the compiler settings are discovered; prior to that CMAKE_SIZEOF_VOID_P is empty
# install syntax (after building): cmake -DCMAKE_INSTALL_CONFIG_NAME=<Release/Debug> -DCMAKE_INSTALL_PREFIX=<install_root> -P cmake_install.cmake
if(PLATFORM_WINDOWS OR PLATFORM_LINUX)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX}/intel64")
else()
set(SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX}/ia32")
endif()
elseif(PLATFORM_ANDROID)
if("${ANDROID_ABI}" STREQUAL "")
message(FATAL_ERROR "No ABI set for Android build")
endif()
set(SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX}/${ANDROID_ABI}")
endif()
message(STATUS "Install binary prefix: ${SDK_INSTALL_BINARY_PREFIX}")
#go through and handle dependencies many of these are so tests will compile
if(BUILD_ONLY)
LIST(FIND BUILD_ONLY "aws-cpp-sdk-access-management" OUTPUT_VAR)
if( OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
endif()
LIST(FIND BUILD_ONLY "aws-cpp-sdk-identity-management" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-access-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
endif()
LIST(FIND BUILD_ONLY "aws-cpp-sdk-transfer" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-s3")
endif()
LIST(FIND BUILD_ONLY "aws-cpp-sdk-sqs" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-access-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
endif()
LIST(FIND BUILD_ONLY "aws-cpp-sdk-queues" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-sqs")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-access-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
endif()
LIST(FIND BUILD_ONLY "aws-cpp-sdk-lambda" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-access-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
endif()
#if none have been supplied, add them all
else()
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-access-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-autoscaling")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-acm")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-apigateway")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudhsm")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudformation")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudfront")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudsearch")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudsearchdomain")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cloudtrail")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-codecommit")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-codedeploy")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-codepipeline")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-identity")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-cognito-sync")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-config")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-datapipeline")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-devicefarm")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-directconnect")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-dms")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-ds")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-dynamodb")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-ec2")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-ecs")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-ecr")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elasticache")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elasticbeanstalk")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elasticfilesystem")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elasticloadbalancing")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elasticmapreduce")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-elastictranscoder")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-email")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-es")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-events")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-firehose")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-gamelift")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-glacier")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iam")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-importexport")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-inspector")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-iot")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-identity-management")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-kinesis")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-kms")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-lambda")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-logs")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-machinelearning")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-marketplacecommerceanalytics")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-mobileanalytics")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-meteringmarketplace")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-monitoring")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-opsworks")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-queues")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-rds")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-redshift")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-route53")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-route53domains")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-s3")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-sdb")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-sns")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-sqs")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-ssm")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-storagegateway")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-sts")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-support")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-swf")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-transfer")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-waf")
LIST(APPEND BUILD_ONLY "aws-cpp-sdk-workspaces")
endif()
LIST(REMOVE_DUPLICATES BUILD_ONLY)
if(ADD_CUSTOM_CLIENTS OR REGENERATE_CLIENTS)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --prepareTools
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
if(REGENERATE_CLIENTS)
message(STATUS "Regenerating clients that have been selected for build.")
execute_process(
COMMAND ${PYTHON_CMD} scripts/wipe_generated_code.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
SET(OUTPUT_VAR -1)
#cognito identity
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cognito-identity" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cognito-identity --apiVersion 2014-06-30 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cognito sync
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cognito-sync" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cognito-sync --apiVersion 2014-06-30 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#dynamodb
LIST(FIND BUILD_ONLY "aws-cpp-sdk-dynamodb" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName dynamodb --apiVersion 2012-08-10 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#dms
LIST(FIND BUILD_ONLY "aws-cpp-sdk-dms" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName dms --apiVersion 2016-01-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#sqs
LIST(FIND BUILD_ONLY "aws-cpp-sdk-sqs" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName sqs --apiVersion 2012-11-05 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#lambda
LIST(FIND BUILD_ONLY "aws-cpp-sdk-lambda" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName lambda --apiVersion 2015-03-31 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#kinesis
LIST(FIND BUILD_ONLY "aws-cpp-sdk-kinesis" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName kinesis --apiVersion 2013-12-02 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#s3
LIST(FIND BUILD_ONLY "aws-cpp-sdk-s3" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName s3 --apiVersion 2006-03-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elastic beanstalk
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elasticbeanstalk" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elasticbeanstalk --apiVersion 2010-12-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elastic load balancing
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elasticloadbalancing" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elasticloadbalancing --apiVersion 2012-06-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#rds
LIST(FIND BUILD_ONLY "aws-cpp-sdk-rds" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName rds --apiVersion 2014-10-31 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#mobileanalytics
LIST(FIND BUILD_ONLY "aws-cpp-sdk-mobileanalytics" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName mobileanalytics --apiVersion 2014-06-05 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#opsworks
LIST(FIND BUILD_ONLY "aws-cpp-sdk-opsworks" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName opsworks --apiVersion 2013-02-18 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudfront
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudfront" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudfront --apiVersion 2016-01-28 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#kms
LIST(FIND BUILD_ONLY "aws-cpp-sdk-kms" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName kms --apiVersion 2014-11-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elastic file system
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elasticfilesystem" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elasticfilesystem --apiVersion 2015-02-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#code-deploy
LIST(FIND BUILD_ONLY "aws-cpp-sdk-codedeploy" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName codedeploy --apiVersion 2014-10-06 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#redshift
LIST(FIND BUILD_ONLY "aws-cpp-sdk-redshift" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName redshift --apiVersion 2012-12-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#iam
LIST(FIND BUILD_ONLY "aws-cpp-sdk-iam" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName iam --apiVersion 2010-05-08 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#ecs
LIST(FIND BUILD_ONLY "aws-cpp-sdk-ecs" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ecs --apiVersion 2014-11-13 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#datapipeline
LIST(FIND BUILD_ONLY "aws-cpp-sdk-datapipeline" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName datapipeline --apiVersion 2012-10-29 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#glacier
LIST(FIND BUILD_ONLY "aws-cpp-sdk-glacier" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName glacier --apiVersion 2012-06-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudwatch logs
LIST(FIND BUILD_ONLY "aws-cpp-sdk-logs" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName logs --apiVersion 2014-03-28 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudwatch monitoring
LIST(FIND BUILD_ONLY "aws-cpp-sdk-monitoring" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName monitoring --apiVersion 2010-08-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#simple email service
LIST(FIND BUILD_ONLY "aws-cpp-sdk-email" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName email --apiVersion 2010-12-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elasticache
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elasticache" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elasticache --apiVersion 2015-02-02 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elastic map reduce
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elasticmapreduce" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elasticmapreduce --apiVersion 2009-03-31 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#simpledb
LIST(FIND BUILD_ONLY "aws-cpp-sdk-sdb" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName sdb --apiVersion 2009-04-15 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#sts
LIST(FIND BUILD_ONLY "aws-cpp-sdk-sts" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName sts --apiVersion 2011-06-15 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#elastic transcoder
LIST(FIND BUILD_ONLY "aws-cpp-sdk-elastictranscoder" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName elastictranscoder --apiVersion 2012-09-25 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#sns
LIST(FIND BUILD_ONLY "aws-cpp-sdk-sns" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName sns --apiVersion 2010-03-31 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#autoscaling
LIST(FIND BUILD_ONLY "aws-cpp-sdk-autoscaling" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName autoscaling --apiVersion 2011-01-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudformation
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudformation" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudformation --apiVersion 2010-05-15 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#simple workflow service
LIST(FIND BUILD_ONLY "aws-cpp-sdk-swf" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName swf --apiVersion 2012-01-25 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#firehose
LIST(FIND BUILD_ONLY "aws-cpp-sdk-firehose" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName firehose --apiVersion 2015-08-04 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#acm
LIST(FIND BUILD_ONLY "aws-cpp-sdk-acm" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName acm --apiVersion 2015-12-08 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#api-gateway
LIST(FIND BUILD_ONLY "aws-cpp-sdk-apigateway" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName apigateway --apiVersion 2015-07-09 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudhsm
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudhsm" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudhsm --apiVersion 2014-05-30 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudsearch
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudsearch" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudsearch --apiVersion 2013-01-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudsearchdomain
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudsearchdomain" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudsearchdomain --apiVersion 2013-01-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#cloudtrail
LIST(FIND BUILD_ONLY "aws-cpp-sdk-cloudtrail" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName cloudtrail --apiVersion 2013-11-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#codecommit
LIST(FIND BUILD_ONLY "aws-cpp-sdk-codecommit" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName codecommit --apiVersion 2015-04-13 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#codepipeline
LIST(FIND BUILD_ONLY "aws-cpp-sdk-codepipeline" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName codepipeline --apiVersion 2015-07-09 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#config
LIST(FIND BUILD_ONLY "aws-cpp-sdk-config" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName config --apiVersion 2014-11-12 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#devicefarm
LIST(FIND BUILD_ONLY "aws-cpp-sdk-devicefarm" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName devicefarm --apiVersion 2015-06-23 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#directconnect
LIST(FIND BUILD_ONLY "aws-cpp-sdk-directconnect" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName directconnect --apiVersion 2012-10-25 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#ds
LIST(FIND BUILD_ONLY "aws-cpp-sdk-ds" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ds --apiVersion 2015-04-16 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#ecr
LIST(FIND BUILD_ONLY "aws-cpp-sdk-ecr" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ecr --apiVersion 2015-09-21 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#es
LIST(FIND BUILD_ONLY "aws-cpp-sdk-es" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName es --apiVersion 2015-01-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#events
LIST(FIND BUILD_ONLY "aws-cpp-sdk-events" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName events --apiVersion 2015-10-07 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#gamelift
LIST(FIND BUILD_ONLY "aws-cpp-sdk-gamelift" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName gamelift --apiVersion 2015-10-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#importexport
LIST(FIND BUILD_ONLY "aws-cpp-sdk-importexport" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName importexport --apiVersion 2010-06-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#inspector
LIST(FIND BUILD_ONLY "aws-cpp-sdk-inspector" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName inspector --apiVersion 2015-08-18 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#iot
LIST(FIND BUILD_ONLY "aws-cpp-sdk-iot" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName iot --apiVersion 2015-05-28 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#machinelearning
LIST(FIND BUILD_ONLY "aws-cpp-sdk-machinelearning" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName machinelearning --apiVersion 2014-12-12 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#marketplacecommerceanalytics
LIST(FIND BUILD_ONLY "aws-cpp-sdk-marketplacecommerceanalytics" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName marketplacecommerceanalytics --apiVersion 2015-07-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#marketplacemetering meteringmarketplace
LIST(FIND BUILD_ONLY "aws-cpp-sdk-meteringmarketplace" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName meteringmarketplace --apiVersion 2016-01-14 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#route53
LIST(FIND BUILD_ONLY "aws-cpp-sdk-route53" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName route53 --apiVersion 2013-04-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#route53domains
LIST(FIND BUILD_ONLY "aws-cpp-sdk-route53domains" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName route53domains --apiVersion 2014-05-15 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#ssm
LIST(FIND BUILD_ONLY "aws-cpp-sdk-ssm" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ssm --apiVersion 2014-11-06 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#storagegateway
LIST(FIND BUILD_ONLY "aws-cpp-sdk-storagegateway" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName storagegateway --apiVersion 2013-06-30 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#support
LIST(FIND BUILD_ONLY "aws-cpp-sdk-support" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName support --apiVersion 2013-04-15 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#waf
LIST(FIND BUILD_ONLY "aws-cpp-sdk-waf" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName waf --apiVersion 2015-08-24 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#workspaces
LIST(FIND BUILD_ONLY "aws-cpp-sdk-workspaces" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName workspaces --apiVersion 2015-04-08 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
#ec2
LIST(FIND BUILD_ONLY "aws-cpp-sdk-ec2" OUTPUT_VAR)
if(OUTPUT_VAR GREATER -1)
execute_process(
COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ec2 --apiVersion 2015-10-01 --outputLocation ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
endif()
if(BUILD_SHARED_LIBS)
SET(LIBTYPE SHARED)
if(PLATFORM_WINDOWS)
add_definitions("-DUSE_IMPORT_EXPORT")
SET(SUFFIX dll)
elseif(PLATFORM_LINUX OR PLATFORM_ANDROID)
SET(SUFFIX so)
elseif(PLATFORM_APPLE)
SET(SUFFIX dylib)
endif()
else()
SET(LIBTYPE STATIC)
if(PLATFORM_WINDOWS)
SET(SUFFIX lib)
elseif(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_APPLE)
SET(SUFFIX a)
endif()
endif()
macro(copyDlls exeName)
if(PLATFORM_WINDOWS AND BUILD_SHARED_LIBS)
foreach(arg ${ARGN})
add_custom_command(TARGET ${exeName}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/${arg}/$<CONFIGURATION>/${arg}.dll"
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/)
endforeach()
endif()
endmacro()
# In Windows, this dumps the CL and LINK command lines to the output - makes it much easier to
# check that CMake is passing in the right defines, paths, etc...
#
# set( CMAKE_VERBOSE_MAKEFILE 1 )
# Setup the project configurations.
get_filename_component(AWS_NATIVE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
set(CMAKE_CONFIGURATION_TYPES
Debug # Setup for easy debugging. No optimizations.
DebugOpt # An optimized version of Debug.
Release # Fully optimized, no debugging information.
RelWithDebInfo # A debuggable version of Release.
MinSizeRel # Like Release, but optimized for memory rather than speed.
)
# warning control
if(PLATFORM_WINDOWS)
if(MSVC)
# some of the clients are exceeding the 16-bit code section limit when building x64 debug, so use /bigobj when we build
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
# warnings as errors, max warning level (4)
if(NOT CMAKE_CXX_FLAGS MATCHES "/WX")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
endif()
# taken from http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
#remove bogus errors at generation time if these variables haven't been manually set
if(NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo")
endif()
if(NOT CMAKE_CXX_FLAGS_DEBUGOPT)
set(CMAKE_CXX_FLAGS_DEBUGOPT "")
endif()
if(NOT CMAKE_EXE_LINKER_FLAGS_DEBUGOPT)
set(CMAKE_EXE_LINKER_FLAGS_DEBUGOPT "")
endif()
if(NOT CMAKE_SHARED_LINKER_FLAGS_DEBUGOPT)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUGOPT "")
endif()
endif()
elseif(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_APPLE)
# max warning level, warnings are errors, turn off unused private field. We have one for an empty class.